package com.hsylient.ObserverPattern.inner;

/**
 * @Description
 * @Author Hsylient
 * @Date 2022/12/19/18:50
 */
public class ObserverTest {

    public static void main(String[] args) {
        // 观察者
        Hsylient hsylient = new Hsylient();
        // 通知者
        Secretary secretary = new Secretary();
        secretary.addObserver(hsylient);
        secretary.setChanged();
        secretary.notifyObservers();
    }
}
